package topevery.syn.data.model;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import topevery.syn.data.model.codec.ModelTypeEnumCodec;

import java.time.LocalDateTime;

@Data
public class DeviceNoiseData implements IGlbModel {

    @JSONField(name = "a")
    private Long gid;

    @JSONField(name = "b", serializeUsing = ModelTypeEnumCodec.class, deserializeUsing = ModelTypeEnumCodec.class)
    private ModelTypeEnum modelType = ModelTypeEnum.Noise;

    @JSONField(name = "d")
    private long fid;

    @JSONField(name = "e")
    private String clientKey;

    @JSONField(name = "f")
    private byte upModel;

    @JSONField(name = "g")
    private byte upType;

    @JSONField(name = "h")
    private LocalDateTime dbCreateDate;

    @JSONField(name = "i")
    private LocalDateTime gpsDate;
    /// <summary>
    /// 第几秒，从1开始
    /// </summary>
    @JSONField(name = "j")
    private byte secondIndex;
    /// <summary>
    /// 第几个传感器，从1开始
    /// </summary>
    @JSONField(name = "k")
    private byte sensorIndex;
    @JSONField(name = "l")
    private int sounds;
    @JSONField(name = "m")
    private String instId;

    @Override
    public String getGlbModelKey() {
        return clientKey;
    }

    @Override
    public Long getGid() {
        return gid;
    }

    @Override
    public void setGid(Long gid) {
        this.gid = gid;
    }

    @Override
    public ModelTypeEnum getModelType() {
        return modelType;
    }

    @Override
    public void setModelType(ModelTypeEnum modelType) {
        this.modelType = modelType;
    }
}
